<?php
/**
 * User:chendenan
 * Created On 2022/3/18 0018 22:59
 */
namespace app\common\model\mysql;
use think\Model;
class SpecsValue extends  ModelBase {
    public function getBySpecsId($specsId,$field="*"){
        $where = [
            "specs_id"=>$specsId,
            "status"=>config("status.mysql.table_normal"),
        ];
        $res = $this->where($where)->field($field)->select();
        return $res;
    }
    public function getByName($name){
        $where = [
            "name"=>$name,
            "status"=>config("status.mysql.table_normal"),
        ];
        $res = $this->where($where)->find();
        return $res;
    }
}